<%@page import="com.apexedu.portal.constant.Constants"%>
<%@ page import="com.apexedu.biz.entity.TServiceCode"%>
<%@ page import="com.apexedu.framework.util.SysPropertiesUtil"%>
<%@ page import="com.apexedu.identity.IdConstants"%>
<%@ page import="com.apexedu.identity.entity.LoginUserVO"%>
<%@ page import="com.apexedu.identity.entity.TSysMenu"%>
<%@ page import="com.apexedu.identity.security.CasLoginUtil"%>
<%@ page import="com.apexedu.util.StringUtil"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Random"%>
<jsp:useBean id="showBean" scope="application" class="com.apexedu.biz.IndexPageQuery" />
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%
if (!Constants.ProjectInfo.PROJECT_CODE.equals("shd")) {
		String basePath = request.getContextPath();
		response.sendRedirect(basePath + "/s/uc/" + Constants.ProjectInfo.PROJECT_CODE + "/i");
	}
%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("basePath", basePath);
	SimpleDateFormat sdf_time = new SimpleDateFormat("yyyy/MM/dd");
	Random rand = new Random();
	LoginUserVO tsysUser = (LoginUserVO) session.getAttribute(IdConstants.SESSION_USER);
	String userid = "";
	String username = "";
	if (tsysUser != null) {
		userid = tsysUser.getUserloginid();
		username = tsysUser.getUsername();
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>山东大学网上服务大厅</title>
<link href="${basePath}/resources/css/shd/style.css" rel="stylesheet" type="text/css" />
<link href="${basePath}/resources/css/shd/slide.css" rel="stylesheet" type="text/css" />
<link href="${basePath}/resources/css/shd/aside.css" rel="stylesheet" type="text/css" />
<script src="${basePath}/resources/js/shd/jquery.js"></script>
<script src="${basePath}/resources/js/shd/slide.js"></script>
<script type="application/javascript">
        var conditions='';
        $(function() {
            $("#searchid").keydown(function(e){
                if(e.keyCode==13){
                    search_service();
                }
            });
        });
        function search_service(){
            var gjz=$("#searchid").val();
            var url="${basePath}/s/shd/fwdh?gjz="+encodeURI(encodeURI(gjz));
            window.open(url);
        }
        var basePath = '${basePath}';
        function execLogout() {
            <%if (CasLoginUtil.isSsoEnabled()) {
				// 通知业务系统liveBos登出。
				// 这里的地址是根据项目现场业务系统地址在门户管理后台的系统参数维护里修改。参数名用“livebos.urls”
				String liveBosUrl = SysPropertiesUtil.get("livebos.urls");
				if (StringUtil.isNotBlank(liveBosUrl)) {
					String[] liveBosUrls = liveBosUrl.split(",");
					for (String url : liveBosUrls) {
						out.println("$(\"<iframe src='" + url
								+ "/logout.do' height='0' frameborder='0'/>\").appendTo(\"body\");");
					}
				}
			}%>
            $.get("${basePath}/identity/ajaxlogin.action?act=logout", {q: (new Date()).getTime()}, function (data) {
                data = eval("(" + data + ")");
                if (data.msg == 'success') {
                    <%if (CasLoginUtil.isSsoEnabled()) {%>
                    window.location.href = '<%=CasLoginUtil.getCasServerLogoutUrl()%>?t=' + Math.round(new Date / 1000);
                    <%} else {%>
                    window.location.href = '<%=request.getContextPath()%>?t=' + Math.round(new Date / 1000);
                    <%}%>
                } else {
                    alert(data.msg);
                }
            });

        }

    </script>
</head>
<body>
	<!--header开始-->
	<div class="header-wide bgRed">
		<div class="fontYH " style="width: 1136px; margin: 0 auto">
			<div style="height: 66px; width: 418px; float: left; background-image: url(${basePath}/resources/images/shd/index/logol.png)"></div>
			<div class="search-top">
				<span class="icon-search">
					<img src="${basePath}/resources/images/shd/index/icon-search.png" alt="">
				</span>
				<span id="" class="search-li" style="background: url(${basePath}/resources/images/shd/index/logol.png) 238px 0px"> </span>
				<input id="searchid" maxlength="" class="search-input" type="text" name="gjz" placeholder="搜索服务">
			</div>
			<div class="topMenu">
				<ul>
					<li>
						<a class="home" href="${basePath}">首页</a>
					</li>
					<li>
						<a href="${basePath}/s/shd/fwdh">服务导航</a>
					</li>
					<%
						if (StringUtil.isBlank(userid)) {
					%>
					<li>
						<a href="${basePath}/index_login.jsp">用户登录1</a>
					</li>
					<%
						} else {
					%>
					<li>
						<a href="${basePath}/s/uc/shd/ph">个人中心</a>
					</li>
					<li>
						<a href="#" onclick="execLogout()">注销</a>
					</li>
					<%
						}
					%>

				</ul>
			</div>
		</div>
	</div>
	<!--header结束-->
	<!--右侧边滚动栏内容开始-->
	<aside id="rightSide" class="panel-lv2"> </aside>
	<!--右侧边栏滚动内容结束-->
	<!--图片新闻开始-->
	<div class="slide">
		<div class="ck-slide">
			<div class="slogan">
				<img src="${basePath}/resources/images/shd/index/letter.png" width="608" style="opacity: 0.5">
			</div>
			<ul class="ck-slide-wrapper">
				<li>
					<a href="#">
						<img src="${basePath}/resources/images/shd/index/banner003.jpg" alt="" width="100%">
					</a>
				</li>
			</ul>
		</div>
	</div>
	<!--图片新闻结束-->


	<!--二级开始---------------------------------------------------------------------------------------------------------------------------------------------------------->
	<div id="lib_Tab1" style="Min-width:1240px;_width:expression(this.scrollwidth < 1240 ? '1240px' : 'auto')">
		<div class="lib_Contentbox lib_tabborder">
			<div id="con_1_1">
				<div class="item">
					<!--服务开始-->
					<div class="fence-wide service">
						<div class="yard-1136">
							<div class="tabs" style="width: 1136px; margin: auto">
								<ul class="menu" style="border-bottom: solid 1px #ccc; width: 1136px; height: 50px">
									<%
										List<TServiceCode> serviceCodeList_teach = showBean.getServiceCode("fwlb", "5");
										if (serviceCodeList_teach != null && serviceCodeList_teach.size() > 0) {
											for (int i = 0; i < serviceCodeList_teach.size(); i++) {
												TServiceCode tserviceCode = serviceCodeList_teach.get(i);
												if (i == 0) {
									%>
									<li class="on" style="font-size: 16px;"><%=tserviceCode.getZdmc()%></li>
									<%
										} else {
									%>
									<li class="" style="font-size: 16px;"><%=tserviceCode.getZdmc()%></li>
									<%
										}
											}
										}
									%>
								</ul>
								<%
									if (serviceCodeList_teach != null && serviceCodeList_teach.size() > 0) {
										for (int i = 0; i < serviceCodeList_teach.size(); i++) {
											TServiceCode tserviceCode = serviceCodeList_teach.get(i);
											if (i == 0) {
								%>
								<div class="main">
									<div class="tab" style="display: block; height: 360px;">
										<div class="ser-contain">
											<%
												List<TSysMenu> teacher_type_1_List = showBean.getTypeMenu("teacher", tserviceCode.getZdbm(),
																	"12", userid);
											%>
											<ul class="ly-clearFixM">
												<%
													if (teacher_type_1_List.size() > 0) {
																	int num_service = teacher_type_1_List.size() == 12 ? 11 : teacher_type_1_List.size();
																	for (int j = 0; j < num_service; j++) {
																		TSysMenu menu = teacher_type_1_List.get(j);
												%>
												<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
													<div class="image">
														<i class=""></i>
														<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
													</div>
													<div class="information">
														<div style="overflow: hidden">
															<div class="title fontYH tl " title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
															<i class=""></i>
														</div>
														<div class="classify fontYH tl " title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
													</div>
												</li>
												<%
													}
																	if (teacher_type_1_List.size() >= 12) {
												%>
												<li onclick="window.open('${basePath}/s/shd/fwdh?serviceids=teacher,<%=tserviceCode.getZdbm()%>');">
													<div class="image">
														<i class=""></i>
														<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
													</div>
													<div class="information">
														<div style="overflow: hidden">
															<div class="title fontYH tl " title="更多">更多</div>
															<i class=""></i>
														</div>
														<div class="classify fontYH tl " title="更多服务">
															更多<%=tserviceCode.getZdmc()%>服务
														</div>
													</div>
												</li>
												<%
													}
																}
												%>
											</ul>
										</div>
									</div>
									<%
										} else {
									%>
									<div class="tab" style="display: none; height: 360px;">
										<div class="ser-contain">
											<%
												List<TSysMenu> student_type_2_List = showBean.getTypeMenu("teacher", tserviceCode.getZdbm(),
																	"12", userid);
											%>
											<ul class="ly-clearFixM">
												<%
													if (student_type_2_List.size() > 0) {
																	int num_service = student_type_2_List.size() == 12 ? 11 : student_type_2_List.size();
																	for (int n = 0; n < num_service; n++) {
																		TSysMenu menu = student_type_2_List.get(n);
												%>
												<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
													<div class="image">
														<i class=""></i>
														<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
													</div>
													<div class="information">
														<div style="overflow: hidden">
															<div class="title fontYH tl " title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
															<i class=""></i>
														</div>
														<div class="classify fontYH tl " title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
													</div>
												</li>
												<%
													}
																	if (student_type_2_List.size() >= 12) {
												%>
												<li onclick="window.open('${basePath}/s/shd/fwdh?serviceids=student,<%=tserviceCode.getZdbm()%>');">
													<div class="image">
														<i class=""></i>
														<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
													</div>
													<div class="information">
														<div style="overflow: hidden">
															<div class="title fontYH tl " title="更多">更多</div>
															<i class=""></i>
														</div>
														<div class="classify fontYH tl " title="更多服务">更多服务</div>
													</div>
												</li>
												<%
													}
																}
												%>
											</ul>
										</div>
									</div>
									<%
										}
											}
										}
									%>
								</div>
							</div>
						</div>
					</div>
					<!--服务结束-->
					<!--最新服务开始-->
					<div class="fence-wide service">
						<div class="yard-1136 ">
							<div class="titMain fontYH">
								<span class="icon-p"></span>
								<span>最新服务</span>
								<span class="eg">Latest Service</span>
							</div>
							<div class="ser-contain">
								<ul class="ly-clearFix">
									<%
										List<TSysMenu> teacher_newList = showBean.getNewMenu("teacher", "8", userid);
										if (teacher_newList != null && teacher_newList.size() > 0) {
											for (int i = 0; i < teacher_newList.size(); i++) {
												TSysMenu menu = teacher_newList.get(i);
									%>
									<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
										<div class="image">
											<i class=""></i>
											<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
										</div>
										<div class="information">
											<div style="overflow: hidden">
												<div class="title fontYH tl" title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
												<i class=""></i>
											</div>
											<div class="classify fontYH tl" title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
										</div>
									</li>
									<%
										}
										}
									%>
								</ul>
							</div>
						</div>
					</div>
					<!--最新服务结束-->
					<!--热门服务开始-->
					<div class="fence-wide service" style="padding-bottom: 12px">
						<div class="yard-1136 ">
							<div class="titMain fontYH">
								<span class="icon-p"></span>
								<span>热门服务</span>
								<span class="eg">Popular Service</span>
							</div>
							<div class="ser-contain">
								<ul class="ly-clearFix">
									<%
										List<TSysMenu> teacher_djsList = showBean.getDjsMenu("teacher", "8", userid);
										if (teacher_djsList.size() > 0) {
											for (int i = 0; i < teacher_djsList.size(); i++) {
												TSysMenu menu = teacher_djsList.get(i);
									%>
									<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
										<div class="image">
											<i class=""></i>
											<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
										</div>
										<div class="information">
											<div style="overflow: hidden">
												<div class="title fontYH tl " title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
												<i class=""></i>
											</div>
											<div class="classify fontYH tl " title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
										</div>
									</li>
									<%
										}
										}
									%>
								</ul>
							</div>
						</div>
					</div>
					<!--热门服务结束-->

				</div>
				<script src="${basePath}/resources/js/shd/jquery-1.7.1.min.js" type="text/javascript"></script>
				<script src="${basePath}/resources/js/shd/TabSwitch.js" type="text/javascript"></script>
				<script type="text/javascript">
					$(document).ready(function() {
						$('.tabs').myTab({
							operate : 'mouseover',
							time : 1000,
							auto : true,
							delayTime : 0
						})
					});
				</script>
				<!--服务结束-->
			</div>
			<div id="con_1_2" style="display: none">
				<div class="item">
					<!--服务开始-->
					<div class="fence-wide service">
						<div class="yard-1136">
							<div class="tabs" style="width: 1136px; margin: auto;">
								<ul class="menu" style="border-bottom: solid 1px #ccc; width: 1136px; height: 50px">
									<%
										List<TServiceCode> serviceCodeList = showBean.getServiceCode("fwlb", "5");
										if (serviceCodeList.size() > 0) {
											for (int i = 0; i < serviceCodeList.size(); i++) {
												TServiceCode tserviceCode = serviceCodeList.get(i);
									%>
									<li <%if (i == 0) {%> class="on" <%} else {%> class="" <%}%>><%=tserviceCode.getZdmc()%></li>
									<%
										}
										}
									%>
								</ul>
								<%
									if (serviceCodeList.size() > 0) {
										for (int i = 0; i < serviceCodeList.size(); i++) {
											TServiceCode tserviceCode = serviceCodeList.get(i);
											if (i == 0) {
								%>
								<div class="main">
									<div class="tab" style="display: block; height: 360px;">
										<div class="ser-contain">
											<ul class="ly-clearFixM">
												<%
													List<TSysMenu> student_type_1_List = showBean.getTypeMenu("student", tserviceCode.getZdbm(),
																		"12", userid);
																if (student_type_1_List.size() > 0) {
																	for (int j = 0; j < student_type_1_List.size(); j++) {
																		TSysMenu menu = student_type_1_List.get(j);
												%>
												<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
													<div class="image">
														<i class=""></i>
														<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
													</div>
													<div class="information">
														<div style="overflow: hidden">
															<div class="title fontYH tl " title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
															<i class=""></i>
														</div>
														<div class="classify fontYH tl " title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
													</div>
												</li>
												<%
													}
																}
												%>
											</ul>
										</div>
									</div>
									<%
										} else {
									%>
									<div class="tab" style="display: none; height: 360px;">
										<div class="ser-contain">
											<ul class="ly-clearFixM">
												<%
													List<TSysMenu> student_type_2_List = showBean.getTypeMenu("student", tserviceCode.getZdbm(),
																		"12", userid);
																if (student_type_2_List.size() > 0) {
																	for (int n = 0; n < student_type_2_List.size(); n++) {
																		TSysMenu menu = student_type_2_List.get(n);
												%>
												<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
													<div class="image">
														<i class=""></i>
														<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
													</div>
													<div class="information">
														<div style="overflow: hidden">
															<div class="title fontYH tl " title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
															<i class=""></i>
														</div>
														<div class="classify fontYH tl " title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
													</div>
												</li>
												<%
													}
																}
												%>
											</ul>
										</div>
									</div>
									<%
										}
											}
										}
									%>
								</div>
							</div>
						</div>
					</div>
					<!--服务结束-->
					<!--最新服务开始-->
					<div class="fence-wide service">
						<div class="yard-1136 ">
							<div class="titMain fontYH">
								<span class="icon-p"></span>
								<span>最新服务</span>
								<span class="eg">Latest Service</span>
							</div>
							<div class="ser-contain">
								<ul class="ly-clearFix">
									<%
										List<TSysMenu> student_newList = showBean.getNewMenu("student", "8", userid);
										if (student_newList.size() > 0) {
											for (int i = 0; i < student_newList.size(); i++) {
												TSysMenu menu = student_newList.get(i);
									%>
									<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
										<div class="image">
											<i class=""></i>
											<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
										</div>
										<div class="information">
											<div style="overflow: hidden">
												<div class="title fontYH tl" title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
												<i class=""></i>
											</div>
											<div class="classify fontYH tl" title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
										</div>
									</li>
									<%
										}
										}
									%>
								</ul>
							</div>
						</div>
					</div>
					<!--最新服务结束-->
					<!--热门服务开始-->
					<div class="fence-wide service" style="padding-bottom: 12px">
						<div class="yard-1136 ">
							<div class="titMain fontYH">
								<span class="icon-p"></span>
								<span>热门服务</span>
								<span class="eg">Popular Service</span>
							</div>
							<div class="ser-contain">
								<ul class="ly-clearFix">
									<%
										List<TSysMenu> student_djsList = showBean.getDjsMenu("student", "8", userid);
										if (student_djsList.size() > 0) {
											for (int i = 0; i < student_djsList.size(); i++) {
												TSysMenu menu = student_djsList.get(i);
									%>
									<li onclick="window.open('/s/shd/fwdh/details/<%=menu.getMenuid()%>');">
										<div class="image">
											<i class=""></i>
											<img src="${basePath}/resources/images/shd/index/icon/<%=rand.nextInt(11)+1%>.png">
										</div>
										<div class="information">
											<div style="overflow: hidden">
												<div class="title fontYH tl " title="<%=menu.getMenuname()%>"><%=menu.getMenuname()%></div>
												<i class=""></i>
											</div>
											<div class="classify fontYH tl " title="<%=menu.getFwtype()%>"><%=menu.getFwtype()%></div>
										</div>
									</li>
									<%
										}
										}
									%>
								</ul>
							</div>
						</div>
					</div>
					<!--热门服务结束-->
				</div>
			</div>

		</div>


	</div>
	</div>
	<!--tab切换开始-->
	<script type="text/javascript">
	
		function setTab(name, cursel, n) {
			for (i = 1; i <= n; i++) {
				var menu = document.getElementById(name + i);
				var con = document.getElementById("con_" + name + "_" + i);
				menu.className = i == cursel ? "hover" : "";
				con.style.display = i == cursel ? "block" : "none";
			}
		}
	</script>
	<!--tab切换结束-->
	<!--二级结束-->

	<!--快捷通道开始-->
	<div class="service">
		<div class="channel ">
			<div class="channel-q">
				<ul>
					<li>
						<a href="http://portal.sdu.edu.cn/" target="_black">
							<img src="${basePath}/resources/images/shd/index/icon/k1.png" alt="办公系统" width="92" height="92" />
						</a>
					</li>
					<li>
						<a href="http://www.oa.sdu.edu.cn/" target="_black">
							<img src="${basePath}/resources/images/shd/index/icon/k2.png" alt="OA系统" width="92" height="92" />
						</a>
					</li>
					<li>
						<a href="http://www.lib.sdu.edu.cn/portal/tpl/home/index" target="_black">
							<img src="${basePath}/resources/images/shd/index/icon/k3.png" alt="图书馆" width="92" height="92" />
						</a>
					</li>
					<li>
						<a href="http://www.culture.sdu.edu.cn/" target="_black">
							<img src="${basePath}/resources/images/shd/index/icon/k4.png" alt="山大文化" width="92" height="92" />
						</a>
					</li>
					<li>
						<a href="http://www.rsc.sdu.edu.cn/2010new2/zp.php" target="_black">
							<img src="${basePath}/resources/images/shd/index/icon/k5.png" alt="人才招聘" width="92" height="92" />
						</a>
					</li>
					<li>
						<a href="http://www.view.sdu.edu.cn/" target="_black">
							<img src="${basePath}/resources/images/shd/index/icon/k6.png" alt="山大新闻" width="92" height="92" />
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<!--快捷通道结束-->
	<!--footer开始-->
	<%@include file="./public_foot.jsp"%>
	<!--footer结束-->
</body>
</html>